package com.alex.provider.controller;

import com.alex.provider.service.TicketService;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class TicketController {

    @Resource
    private Environment env;

    @Resource
    private TicketService ticketService;

    @GetMapping("/ticket")
    public String get() {
        System.out.println(env.getProperty("server.port"));
        return ticketService.getTicket();
    }
}
